stylecontext: Expose a function to get at the current changes
authorBenjamin Otte <otte@redhat.com>
Fri, 30 Nov 2012 19:36:57 +0000 (20:36 +0100)
committerBenjamin Otte <otte@redhat.com>
Fri, 30 Nov 2012 19:36:57 +0000 (20:36 +0100)
gtk/gtkstylecontext.c
gtk/gtkstylecontextprivate.h

index a11ed5fd3e0d34037d9ce4fb2fbb7070289eb050..d8245b971ef2c38044257c440e0e7885fdff25c2 100644 (file)
@@ -4512,6 +4512,26 @@ gtk_draw_insertion_cursor (GtkWidget          *widget,
                          draw_arrow);
 }
 
+/**
+ * _gtk_style_context_get_changes:
+ * @context: the context to query
+ *
+ * Queries the context for the changes for the currently executing
+ * GtkStyleContext::invalidate signal. If no signal is currently
+ * emitted, this function returns %NULL.
+ *
+ * FIXME 4.0: Make this part of the signal.
+ *
+ * Returns: %NULL or the currently invalidating changes
+ **/
+const GtkBitmask *
+_gtk_style_context_get_changes (GtkStyleContext *context)
+{
+  g_return_val_if_fail (GTK_IS_STYLE_CONTEXT (context), NULL);
+
+  return context->priv->invalidating_context;
+}
+
 static AtkAttributeSet *
 add_attribute (AtkAttributeSet  *attributes,
                AtkTextAttribute  attr,
index 0fd3f6bfe773c28649c8e7dc098731625a6f8d4a..14d44c4495360169257651a5e27f23a7e6de4bb6 100644 (file)
@@ -27,6 +27,9 @@ G_BEGIN_DECLS
 
 void            _gtk_style_context_set_widget                (GtkStyleContext *context,
                                                               GtkWidget       *widget);
+const GtkBitmask *
+                _gtk_style_context_get_changes               (GtkStyleContext *context);
+
 GtkCssValue   * _gtk_style_context_peek_property             (GtkStyleContext *context,
                                                               guint            property_id);
 double         _gtk_style_context_get_number                 (GtkStyleContext *context,